import blogModule from "@/modules/blog";

export default async function getBlogBySlug(slug) {
  if (slug === 'all') { return {title: '新闻资讯总览',description: '新闻资讯总览'}; }
  const blog = await blogModule.getBySlug(slug);
  if (!blog) return {title: '404',description: '404'};
  return blog;
}